/**
 * @Author: 张兴
 * @Date: 2019/6/20
 * @Last Modified by:   张兴
 * @Last Modified time: 2019-09-12 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 查询工单表
export const getApply = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getApply`, { params });
// 
export const getTC = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getTC`, { params });
// 查询计划
export const queryProjects = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/queryProjects`, { params });
// 查询备件
export const queryParts = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/queryParts`, { params });
// 查询套餐
export const getPackageCode = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getPackageCode`, { params });
// 编辑 查询项目
export const getProject = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getProject`, { params });
export const getTCXXM = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getTCXXM`, { params });
// 编辑 查询备件
export const getParts = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getParts`, { params });
export const getTCXBJ = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getTCXBJ`, { params });
// 查询主页
export const queryApply = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/queryApply`, { params });
// 抽屉页清空
export const selectAll = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/selectAll`, { params });
// 新增
export const saveApply = params => axios.post(`${SERVER.AUDI_CLAIM}/apply/repairPart/saveApply`, params);
// 删除
export const delectPlan = params => axios.put(`${SERVER.AUDI_CLAIM}/apply/addItem/deleteByXC`,  params );

// 查询 委托书
export const selectWTS = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/selectWTS`, { params });

// 查询 引导数据
export const selectYDSJ = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/selectYDSJ`, { params });

// 查询 购买备件时委托书
// export const selectGMBJWTS = params => axios.get(`${SERVER. AUDI_CLAIM}/claim/claimOrder/selectGMBJWTS`, { params });

// 查询 故障代码
export const selectGZDM = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/selectGZDM`, { params });

// 查询 故障类别
export const selectGZLB = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/selectGZLB`, { params });

// 查询 故障位置
export const selectGZWZ = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/selectGZWZ`, { params });

// 查询 弹出框 标准工件
export const SelectBZGJ = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectBZGJ`, { params });

// 查询 弹出框 特殊材料
export const SelectTSCL = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectTSCL`, { params });

// 查询 弹出框 标准材料
export const SelectBJCL = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectBJCL`, { params });

// 查询 弹出框 外委工位
export const SelectWWGW = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/SelectWWGW`, { params });

// 查询 索赔类别
export const getSelectSPLB = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getSelectSPLB`, { params });

// 查询 车辆类别
export const getSelectCLLB = params => axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getSelectCLLB`, { params });

// 抽屉业  保存
export const saveOrUpdate = params => axios.put(`${SERVER.AUDI_CLAIM}/claim/claimOrder/saveOrUpdate`, params);
// 上传新车保养
export const upload = params =>
  axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/upload`, {
    params
  });


  // 查询项目
  export const getItem = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getItem`, { params });
  // 查询备件
export const getPart = params => axios.get(`${SERVER.AUDI_CLAIM}/apply/addItem/getPart`, { params });



// 新增 获取项目
export const getXmInfo = (id, params) =>
  axios.get(`${SERVER.AUDI_CLAIM}/claim/claimOrder/getClaimLabours/${id}`, {
    params
  });


  // TABLE中翻译车系
export const getSeries = params =>
axios.get(`${SERVER.DMSCLOUD_REPAIR}/baseData/basicData/series`, {
  params
});
